let log = ''
const limit = 5 * 1024 * 1024 // 5M

export function addLogItem(item) {
  if (log.length > limit) {
    log = ''
  }
  log += item + '\n'
}

export function getLogs() {
  return log
}